package groovy
def fact(BigInteger number){
    if(number==1) 1 else fact(number-1)
}
try{
    println("the fact(5) is ${fact(5)}")
    println("Number of bits in the result is ${fact(5000).bitCount()}")

}catch (Throwable throwable){
    println("Caugt ${throwable.class.name}")
}
